package com.yuhs.zixing.study.design.pattern.dp002.structural.s007.proxy.p001;

/**
 * @description:
 * @author: yuhs
 * @date: 2022/5/2 11:30 AM
 */
public class GamePlayer001 implements IGamePlayer001 {
    private String name = "";

    //通过构造函数传递名称
    public GamePlayer001(String _name) {
        this.name = _name;
    }

    //打怪，最期望的就是杀老怪
    public void killBoss() {
        System.out.println(this.name + "在打怪！");
    }

    //进游戏之前你肯定要登录吧，这是一个必要条件
    public void login(String user, String password) {
        System.out.println("登录名为" + user + "的用户" + this.name + "登录成功！");
    }

    //升级，升级有很多方法，花钱买是一种，做任务也是一种
    public void upgrade() {
        System.out.println(this.name + " 又升了一级！");
    }
}